package com.atguigu.gmall.item;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
//抽取feign以后，每个微服务要引用，要自己声明feign所在的包
@EnableFeignClients(basePackages = {"com.atguigu.gmall.feign.product",
                                    "com.atguigu.gmall.feign.order",
                                    "com.atguigu.gmall.feign.search"}) //开启feign的远程调用
/**
 * 还要加
 *   main:
 *     allow-bean-definition-overriding: true  #允许bean定义的重写
 */
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
@EnableDiscoveryClient
@EnableCircuitBreaker
public class ItemApplication {
    public static void main(String[] args) {
        SpringApplication.run(ItemApplication.class,args);
    }
}
